s=input()
ans=len(s)
letter=0
blank=0
digit=0
other=0
while ans<=10 :
    ans+=len(s)
    for i in s:
        if i.isalpha():
            letter+=1
        elif i.isdigit():
            digit+=1
        elif i==' ':
            blank+=1
        else:
            other+=1
    if ans<10:
        blank+=1
        s=input()
    ans+=1
print("letter = %d, blank = %d, digit = %d, other = %d"%(letter,blank,digit,other))